﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class artilce_detail : Base
{

    public int id = 0;
    public Model.V_Feelings model = null;
    BLL.V_ImageUser b = new BLL.V_ImageUser();
    protected void Page_Load(object sender, EventArgs e)
    {

        id = base.QueryInt32("id");

        BLL.V_Feelings bll = new BLL.V_Feelings();
        model = bll.GetModelBystrWhere(" id=" + id);
        if (model == null)
        {
            Server.Transfer("/error/404.html");
        }
        base.PageSize = 10;
        BindArticle();
        BindShoulu();
        BindRandom();
    }

    public void BindArticle()
    {
    }

    public void BindShoulu()
    {
        BLL.V_FavoritesFeeling bll = new BLL.V_FavoritesFeeling();
        List<Model.V_FavoritesFeeling> lists =  bll.GetList(20, " ID=" + id, " FavoritesTime desc");
        this.rptShoulu.DataSource = lists;
        this.rptShoulu.DataBind();
    }
    public void BindRandom()
    {
        List<Model.V_ImageUser> imgs = b.GetList(6, "1=1", " newid() asc");
        rptRandomPic.DataSource = imgs;
        rptRandomPic.DataBind();
    }
}